home *** CD-ROM | disk | FTP | other *** search
/ SPACE 1 / SPACE - Library 1 - Volume 1.iso / demos / 8 / readme.doc / print.doc < prev    next >
Encoding:
Text File  |  1985-06-09  |  3.7 KB  |  145 lines

  1.             Printing with 4xFORTH 
  2.  
  3.  
  4. Overview
  5. --------
  6.  
  7.     Printing utilities and flexible output device control is provided
  8.     as a natural part of 4xFORTH.   These capabilities are detailed in
  9.     this section.
  10.  
  11.  
  12. Named Load Streams
  13. ------------------
  14.  
  15.     Several groups of related software items have been developed, and
  16.     loaders provided for them so that the system user need not load
  17.     all of them at any one time.  The following areas have been loaded
  18.     in the DEMO system in such a way that they cannot be deleted.  This
  19.     would usually be under the control of the user.
  20.  
  21.             PRINTING        \ Printing routines that
  22.                         \ allow I/O redirection
  23.  
  24.             DISKING            \ Additional utilities for
  25.                         \ the manipulation of disk
  26.                         \ block.  They are restricted
  27.                         \ to use with RAM.DISK in the
  28.                         \ demo.
  29.  
  30.             OPERATORS        \ Additional operators.
  31.  
  32.  
  33.             GRAPHICS        \ Graphics routines.
  34.  
  35.  
  36. PRINTING
  37. --------
  38.  
  39.     Some basic printing routines have been defined to allow the user
  40.     to direct the output to a default output device.  The default
  41.     output device is specifiable by the user.
  42.  
  43.     The output device which will be used, if PRINT is specified, is
  44.     flagged in a variable called DEFAULT.PRINTER.  The flag values
  45.     are:
  46.  
  47.             0 = Centronics parallel port
  48.             1 = Serial port
  49.             2 = Built-in CRT terminal
  50.  
  51.     Setting of this variable should be done using the "!" operator.
  52.     e.g.:
  53.  
  54.             0 DEFAULT.PRINTER !    \ set to centronics port
  55.         or    1 DEFAULT.PRINTER !     \ set to serial port
  56.  
  57.  
  58.  
  59. Enabling I/O Redirection
  60. ------------------------
  61.  
  62.     Simply setting the variable DEFAULT.PRINTER does not cause output
  63.     to be redirected.  The definition PRINT causes the redirection of
  64.     output from the execution of the following definitions:
  65.  
  66.             LIST
  67.             INDEX
  68.             SHOW
  69.             TYPIST
  70.  
  71.     The definition NOPRINT causes execution of the previous definitions
  72.     to send data to crt screen.   Thus
  73.  
  74.             PRINT  20 63 SHOW  NOPRINT  <cr>
  75.  
  76.     will cause the system to list blocks 20 to 63 inclusive to the printer
  77.     selected by the value in DEFAULT.PRINTER, and then the I/O redirection
  78.     will be terminated by the word NOPRINT.
  79.  
  80.  
  81. Printing Routines
  82. -----------------
  83.  
  84.     COLON    LIST
  85.  
  86.         <blk#> LIST
  87.  
  88.     Print the block whose number is on the top of the stack.  The block
  89.     will be labeled with its number and each line will be numbered.
  90.  
  91.  
  92.     COLON    INDEX
  93.  
  94.         <first block> <last block>  INDEX
  95.  
  96.     INDEX prints the first line of each block in the specified range.
  97.     It is STRONGLY recommended that you reserve this line for some
  98.     header that will tell you:
  99.  
  100.         1.    What area the code contained in the block
  101.             relates to.
  102.  
  103.         2.    The sequence number within a related area.
  104.  
  105.         3.    The initials of the author,
  106.  
  107.     and    4.    The date of the code.
  108.  
  109.  
  110.     COLON    SHOW
  111.  
  112.         <first block> <last block>  SHOW
  113.  
  114.     List the blocks in the given range, three to a page.  The listing
  115.     will include a header whose selection is discussed in the primary
  116.     documentation for 4xFORTH, labels for each block, and line numbers.
  117.     The time of day and date may also be included if you desire it.
  118.     This is discussed in the primary documentation for 4xFORTH.
  119.  
  120.  
  121.     COLON    TYPIST
  122.  
  123.         <first block> <last block>  TYPIST
  124.  
  125.     Print the blocks specified as text without headers, separators, or
  126.     line numbers.  This definition allows the 4xFORTH system to be used
  127.     as a simple text system ... a smart typewriter.  Dumb, but very
  128.     handy at times.
  129.  
  130.  
  131. Use of a Serial Printer
  132. -----------------------
  133.  
  134.     4xFORTH does internal monitoring for XON and XOFF (^Q and ^S) during
  135.     the printing process.  The serial port need not be set to monitor
  136.     for these characters.
  137.  
  138.  
  139. Finally
  140. -------
  141.  
  142.     The standard documentation for 4xFORTH further explains how the user
  143.     can provide output device selection for ANY definition which prints
  144.     things.
  145. ə